|
|
|
Comparing both class
definitions we can observe the following:
|
|
•Both classes have two data elements x and y. In the
class Point these elements describe the position of the point, in the
case of class Circle they describe the circle's center. Thus, x
and y have the same meaning in both classes: They describe the
position of their associated object by defining a point.
|
|
•Both classes offer the same set of methods to get and set the value of
the two data elements x and y.
|
|
•Class Circle ``adds'' a new data element radius and
corresponding access methods.
|
|
|